Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support displaying complex mime types in Output Widget #10327

Merged
merged 13 commits into from
Jun 16, 2022
Merged

Conversation

DonJayamanne
Copy link
Contributor

Fixes #9503

@@ -30,7 +30,6 @@ import { CellExecutionCreator } from './cellExecutionCreator';
import { IApplicationShell } from '../../platform/common/application/types';
import { disposeAllDisposables } from '../../platform/common/helpers';
import { traceError, traceWarning } from '../../platform/logging';
import { RefBool } from '../../platform/common/refBool';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't need such a class, all we need is a property (added comments what the property does with reference to Jupyter docs)

@codecov-commenter
Copy link

codecov-commenter commented Jun 6, 2022

Codecov Report

Merging #10327 (0c98164) into main (6525848) will increase coverage by 0%.
The diff coverage is 64%.

@@           Coverage Diff           @@
##            main   #10327    +/-   ##
=======================================
  Coverage     70%      71%            
=======================================
  Files        480      480            
  Lines      28946    29009    +63     
  Branches    4860     4886    +26     
=======================================
+ Hits       20498    20633   +135     
+ Misses      6543     6430   -113     
- Partials    1905     1946    +41     
Impacted Files Coverage Δ
...c/kernels/execution/cellExecutionMessageHandler.ts 72% <64%> (-2%) ⬇️
src/kernels/common/chainingExecuteRequester.ts 87% <0%> (-7%) ⬇️
src/kernels/variables/pythonVariableRequester.ts 69% <0%> (-4%) ⬇️
src/kernels/variables/kernelVariables.ts 56% <0%> (-3%) ⬇️
src/interactive-window/commands/commandRegistry.ts 34% <0%> (-2%) ⬇️
src/platform/api/kernelApi.ts 71% <0%> (-2%) ⬇️
src/platform/common/utils/decorators.ts 90% <0%> (-1%) ⬇️
src/platform/common/configSettings.ts 84% <0%> (-1%) ⬇️
src/kernels/jupyter/types.ts 100% <0%> (ø)
src/platform/common/types.ts 100% <0%> (ø)
... and 49 more

@@ -109,9 +109,14 @@ export function renderOutput(outputItem: OutputItem, element: HTMLElement, logge
}
export function disposeOutput(outputId?: string) {
if (outputId) {
const widget = renderedWidgets.get(outputId)?.widget;
renderedWidgets.delete(outputId);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We weren't deleting the entry in the map and weren't disposing the widget either.

* - Clearing the custom output that was appended after the output widget.
* - Appending custom output after the output widget
*/
private updateJupyterOutputWidgetWithOutput(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Todo: Should add more comments

@DonJayamanne DonJayamanne marked this pull request as ready for review June 9, 2022 01:29
@DonJayamanne DonJayamanne requested a review from a team as a code owner June 9, 2022 01:29
@rchiodo
Copy link
Contributor

rchiodo commented Jun 9, 2022

I have to admit this is way to complicated to grok your algorithm. I just hope we have enough tests.

@DonJayamanne
Copy link
Contributor Author

to grok your algorithm. I just hope we have enough tests.

Yes, I think we have enough. Wil test a little bit more and look for different output widget usages and add more tests.

@DonJayamanne
Copy link
Contributor Author

@rchiodo I'm going to merge this and will submit feature request (discuss with Rob & Matt) for the enhancements.

@DonJayamanne DonJayamanne merged commit 94de3cd into main Jun 16, 2022
@DonJayamanne DonJayamanne deleted the issue9503Fixes branch June 16, 2022 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Output messages sent from widgets not displayed in cell output
3 participants